#include <bits/stdc++.h>
using namespace std;
#define int long long
int mod=1e5+7;
int qpow(int x,int n)
{
    int ret=1;
    while(n)
    {
        if(n&1)ret=ret*x%mod;
        x=x*x%mod;
        n>>=1;
    }
    return ret;
}
int N(int x)
{
    return qpow(x,mod-2);
}
void test()
{
    cout<<LONG_LONG_MAX<<endl;
}
void solve()
{
    int n;
    cin>>n;
    vector<int>x(n+1),y(n+1);
    for(int i=1;i<=n;i++)
    {
        cin>>x[i]>>y[i];
    }
    //vector<unordered_map<int, unordered_map<int, int>>> m(n+1);
    unordered_map<int, unordered_map<int, int>> m;
    int ans=0;
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=n;j++)
        {
            if(i==j)continue;
            int dis=(x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i]);
            int k;
            if(x[j]==x[i])k=LONG_LONG_MAX;
            else
            {
                k=(y[j]-y[i])*N(x[j]-x[i]);
            }
            m[dis][k]++;
        }
        for(auto x:m)
        {
            for(auto y:x.second)
            {
                for(auto z:x.second)
                {
                    if(y==z)continue;
                    ans+=y.second*z.second;
                }
            }
        }
        m.clear();
    }
    cout<<ans/2<<endl;
}
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int T=1;
    //cin>>T;
    while(T--)
    {
        solve();
        //test();
    }
    return 0;
}